<?php
class Controller extends SmartyView{

	/**
	 * 成功提示方法
	 */
	protected function success($msg,$url){
		header('Content-type:text/html;charset=utf-8');
		$str = <<<str
<div  style="position: absolute;top:0px;left: 0px;z-index: 1000;width: 100%;height: 100%;display:block;"><div  style="width: 400px;height: 100px;background: #fff;font-family: 微软雅黑;font-size: 16px;padding: 15px;text-align: center;vertical-align: middle;margin:100px auto;box-shadow: 3px 3px 3px #C8C8C8,-3px -3px 3px #C8C8C8;border-radius:15px;">系统提示<br /><br /><script type="text/javascript">document.write('{$msg}')</script>！3秒后为您跳转,若无响应请<a href='$url'>点此返回</a></div></div>
<script type="text/javascript">
setTimeout(function(){window.location.href='{$url}'},3000);
</script>
str;
		echo $str;die;
	}
	
	/**
	 * 错误提示方法
	 */
	protected function error($msg){
		header('Content-type:text/html;charset=utf-8');
		$str = <<<str
<div  style="position: absolute;top:0px;left: 0px;z-index: 1000;width: 100%;height: 100%;background:rgba(255, 255, 255, 0.3);display:block;"><div  style="width: 400px;height: 100px;box-shadow: 3px 3px 3px #C8C8C8,-3px -3px 3px #C8C8C8;border-radius:15px;background: #fff;font-family: 微软雅黑;font-size: 16px;padding: 15px;text-align: center;vertical-align: middle;margin:100px auto;">系统提示<br /><br /><script type="text/javascript">document.write('{$msg}')</script>！3秒后为您跳转,若无响应请<a href='javascript:history.back();')/>点此返回</a></div></div>
<script type="text/javascript">
// alert("{$msg}");
// history.back();
setTimeout(function(){history.back();},3000);
</script>
str;
		echo $str;die;
	}


}
?>